for $mediathek in doc("Aufgabe3_test_output.xml")/Mediathek
return <Composers> {
    (for $composers in $mediathek//Composers/Assignments
    where fn:count($composers/Composer) = 0
    return $composers/OldComposer)
    union
    (for $track in $mediathek//Track
    where fn:count($track/Composers) = 0
    return $track)
}
</Composers>